namespace KPIS.GERP.Models.Migrations
{
    using System;
    using System.Data.Entity.Migrations;
    
    public partial class update0008 : DbMigration
    {
        public override void Up()
        {
            RenameTable(name: "dbo.HrmMasNamePrefix", newName: "mas_name_prefixes");
            RenameTable(name: "dbo.hrm_position", newName: "hrm_mp_positions");
            RenameColumn(table: "dbo.mas_name_prefixes", name: "NamePrefixId", newName: "name_prefix_seq");
            RenameColumn(table: "dbo.mas_name_prefixes", name: "GenderId", newName: "gender_seq");
            RenameColumn(table: "dbo.mas_name_prefixes", name: "Code", newName: "gender_code");
            RenameColumn(table: "dbo.mas_name_prefixes", name: "Name", newName: "gender_name");
            RenameColumn(table: "dbo.mas_name_prefixes", name: "NameEng", newName: "name_eng");
            RenameColumn(table: "dbo.mas_name_prefixes", name: "NameShort", newName: "name_short");
            RenameColumn(table: "dbo.mas_name_prefixes", name: "NameEngShort", newName: "name_eng_short");
            RenameColumn(table: "dbo.mas_name_prefixes", name: "RecordStatus", newName: "record_status");
            RenameColumn(table: "dbo.mas_name_prefixes", name: "CreatedBy", newName: "created_by");
            RenameColumn(table: "dbo.mas_name_prefixes", name: "CreatedWhen", newName: "created_when");
            RenameColumn(table: "dbo.mas_name_prefixes", name: "UpdatedBy", newName: "updated_by");
            RenameColumn(table: "dbo.mas_name_prefixes", name: "UpdatedWhen", newName: "updated_when");
        }
        
        public override void Down()
        {
            RenameColumn(table: "dbo.mas_name_prefixes", name: "updated_when", newName: "UpdatedWhen");
            RenameColumn(table: "dbo.mas_name_prefixes", name: "updated_by", newName: "UpdatedBy");
            RenameColumn(table: "dbo.mas_name_prefixes", name: "created_when", newName: "CreatedWhen");
            RenameColumn(table: "dbo.mas_name_prefixes", name: "created_by", newName: "CreatedBy");
            RenameColumn(table: "dbo.mas_name_prefixes", name: "record_status", newName: "RecordStatus");
            RenameColumn(table: "dbo.mas_name_prefixes", name: "name_eng_short", newName: "NameEngShort");
            RenameColumn(table: "dbo.mas_name_prefixes", name: "name_short", newName: "NameShort");
            RenameColumn(table: "dbo.mas_name_prefixes", name: "name_eng", newName: "NameEng");
            RenameColumn(table: "dbo.mas_name_prefixes", name: "gender_name", newName: "Name");
            RenameColumn(table: "dbo.mas_name_prefixes", name: "gender_code", newName: "Code");
            RenameColumn(table: "dbo.mas_name_prefixes", name: "gender_seq", newName: "GenderId");
            RenameColumn(table: "dbo.mas_name_prefixes", name: "name_prefix_seq", newName: "NamePrefixId");
            RenameTable(name: "dbo.hrm_mp_positions", newName: "hrm_position");
            RenameTable(name: "dbo.mas_name_prefixes", newName: "HrmMasNamePrefix");
        }
    }
}
